package com.club.football.common;


import com.club.football.dto.UsersDto;

/**
 * 用户持有人
 *
 * @author gh
 * @date 2023/09/19
 */
public class UserHolder {
    private static final ThreadLocal<UsersDto> TL = new ThreadLocal<>();

    public static void saveUser(UsersDto user) {
        TL.set(user);
    }

    public static UsersDto getUser() {
        return TL.get();
    }

    public static void removeUser() {
        TL.remove();
    }
}